package com.reebake.ideal.org.controller;

import cn.hutool.core.bean.BeanUtil;
import com.reebake.ideal.org.service.OrganizationMemberService;
import com.reebake.ideal.org.vo.OrganizationMemberVO;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 成员控制层
 */
@Tag(name = "成员对象功能接口")
@RestController
@RequestMapping("/organization/member")
public class OrganizationMemberPlusController {
    @Autowired
    private OrganizationMemberService organizationMemberService;

    @GetMapping("/query-by-id/{id}")
    public OrganizationMemberVO queryById(@PathVariable("id") String id) {
        return BeanUtil.copyProperties(organizationMemberService.getById(id), OrganizationMemberVO.class);
    }
}
